package com.education.course.service.impl;

import java.util.List;
import com.education.common.utils.DateUtils;
import com.education.course.domain.EduCourseSubject;
import com.education.course.mapper.EduCourseSubjectMapper;
import com.education.course.service.IEduCourseSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author education
 * @date 2024-07-24
 */
@Service
public class EduCourseSubjectServiceImpl implements IEduCourseSubjectService
{
    @Autowired
    private EduCourseSubjectMapper eduCourseSubjectMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public EduCourseSubject selectEduCourseSubjectById(Long id)
    {
        return eduCourseSubjectMapper.selectEduCourseSubjectById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param eduCourseSubject 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<EduCourseSubject> selectEduCourseSubjectList(EduCourseSubject eduCourseSubject)
    {
        return eduCourseSubjectMapper.selectEduCourseSubjectList(eduCourseSubject);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param eduCourseSubject 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertEduCourseSubject(EduCourseSubject eduCourseSubject)
    {
        eduCourseSubject.setCreateTime(DateUtils.getNowDate());
        return eduCourseSubjectMapper.insertEduCourseSubject(eduCourseSubject);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param eduCourseSubject 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateEduCourseSubject(EduCourseSubject eduCourseSubject)
    {
        eduCourseSubject.setUpdateTime(DateUtils.getNowDate());
        return eduCourseSubjectMapper.updateEduCourseSubject(eduCourseSubject);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteEduCourseSubjectByIds(Long[] ids)
    {
        return eduCourseSubjectMapper.deleteEduCourseSubjectByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteEduCourseSubjectById(Long id)
    {
        return eduCourseSubjectMapper.deleteEduCourseSubjectById(id);
    }
}
